﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using AspNetInfo.Core;
using System.Data;

namespace AspNetInfo.Detectors
{
    public class HtmlHeaderDetector : IDetector
    {
        public DataTable Detect(EnvironmentPermissions permissions)
        {
            var dt = DetectorHelper.MakeResultTable();
            var request = HttpContext.Current.Request;
            foreach (string key in request.Headers.AllKeys)
            {
                dt.Rows.Add(key, request.Headers[key]);
            }

            return dt;
        }
        public string Name
        {
            get { return "HTML Header"; }
        }


        public string Description
        {
            get { return String.Empty; }
        }

        public string TabName
        {
            get { return Tabs.Html; }
        }
    }
}
